Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ts-graphviz/core

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ts-graphviz/core

Graphviz Models for Object-Oriented Programming

  • 0.0.0-pr956-20240225163634
  • develop
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is @ts-graphviz/core?

@ts-graphviz/core is a TypeScript library for creating and manipulating Graphviz graphs. It provides a programmatic way to build and render graphs using the Graphviz DOT language.

What are @ts-graphviz/core's main functionalities?

Creating a Graph

This feature allows you to create a directed graph, add nodes, and create edges between them. The `toDot` method converts the graph to DOT format.

const { digraph } = require('@ts-graphviz/core');
const g = digraph('G');
g.node('A');
g.node('B');
g.edge(['A', 'B']);
console.log(g.toDot());

Subgraphs

This feature allows you to create subgraphs within a main graph. Subgraphs can be used to group nodes together.

const { digraph, subgraph } = require('@ts-graphviz/core');
const g = digraph('G');
const s = subgraph('cluster_0');
s.node('A');
s.node('B');
g.subgraph(s);
console.log(g.toDot());

Graph Attributes

This feature allows you to set attributes for the graph, such as the direction of the graph layout.

const { digraph } = require('@ts-graphviz/core');
const g = digraph('G', { rankdir: 'LR' });
g.node('A');
g.node('B');
g.edge(['A', 'B']);
console.log(g.toDot());

Other packages similar to @ts-graphviz/core

Keywords

FAQs

Package last updated on 25 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc